package com.ruoyi.wechat.common;

/**
 * <p>
 * 静态变量类
 * </p>
 *
 * @author YinHeng
 * @since 2024/2/25
 */
public class Constants {
    //延迟队列时间：秒
    public static Long DELAYED_TIME = 3000000L;

    /**
     * 商品附加服务
     */
    public enum AttachItem {
        TYPE_1(1, "全部"),
        TYPE_2(2, "商品大类"),
        TYPE_3(3, "商品小类"),
        TYPE_4(4, "商品本体"),
        TYPE_5(5, "商品规格");

        private Integer value;
        private String desc;

        AttachItem(Integer value, String desc) {
            this.value = value;
            this.desc = desc;
        }

        public Integer getValue() {
            return value;
        }

        public String getDesc() {
            return desc;
        }

    }
    /**
     * 通用
     */
    public enum Common {
        STATUS_0(0, "否"),
        STATUS_1(1, "是");

        private Integer value;
        private String desc;

        Common(Integer value, String desc) {
            this.value = value;
            this.desc = desc;
        }

        public Integer getValue() {
            return value;
        }

        public String getDesc() {
            return desc;
        }

    }

    /**
     * 通用
     */
    public enum FileDirectory {
        DIRECTORY_COMMON("common", "通用目录"),
        DIRECTORY_ICON("icon", "图标"),
        DIRECTORY_IMAGE("image", "图片"),
        DIRECTORY_ORDER("order", "订单截图"),
        DIRECTORY_PRODUCT("product", "商品图片"),
        DIRECTORY_TEMP("temp", "临时图片");

        private String value;
        private String desc;

        FileDirectory(String value, String desc) {
            this.value = value;
            this.desc = desc;
        }

        public String getValue() {
            return value;
        }

        public String getDesc() {
            return desc;
        }

    }

    /**
     * 首页路由
     */
    public enum IndexRoute {
        CATEGORY_0(0, "核心业务"),
        CATEGORY_1(1, "类别");

        private Integer value;
        private String desc;

        IndexRoute(Integer value, String desc) {
            this.value = value;
            this.desc = desc;
        }

        public Integer getValue() {
            return value;
        }

        public String getDesc() {
            return desc;
        }
    }

    /**
     * 订单
     */
    public enum Order {
        TAG_0(0,"非加急订单"),
        TAG_1(1,"加急订单"),

        CATEGORY_1(1, "取件"),
        CATEGORY_2(2, "服务"),
        CATEGORY_3(3, "商品"),

        PAY_STATUS_0(0, "待确认价格"),
        PAY_STATUS_1(1, "待支付"),
        PAY_STATUS_2(2, "支付中"),
        PAY_STATUS_3(3, "支付成功"),
        PAY_STATUS_4(4, "支付取消"),
        PAY_STATUS_5(5, "申请退款"),
        PAY_STATUS_6(6, "退款成功"),
        PAY_STATUS_7(7, "订单关闭"),

        DELV_MODE_1(1, "有人在家，敲门"),
        DELV_MODE_2(2, "无人在家，放门口"),
        DELV_MODE_3(3, "入户密码"),
        DELV_MODE_4(4, "预约时间"),

        DELV_STATUS_1(1, "待接单"),
        DELV_STATUS_2(2, "接单成功待取件"),
        DELV_STATUS_3(3, "取件成功配送中"),
        DELV_STATUS_4(4, "配送完成待用户确认"),
        DELV_STATUS_5(5, "用户确认收货"),

        PAY_METHOD_0(0, "金额为0，无需支付"),
        PAY_METHOD_1(1, "微信小程序支付方式"),
        ;

        private Integer value;
        private String descr;

        Order(Integer value, String descr) {
            this.value = value;
            this.descr = descr;
        }

        public Integer getValue() {
            return value;
        }

        public String getDescr() {
            return descr;
        }
    }

    public static class Login {
        /**
         * 请求认证头key
         */
        public static String AUTH_HEARD = "App-Token";
        /**
         * 登录用户缓存key前缀
         */
        public static String TOKEN_KEY_PRE = "login:token:mini-app:";
    }

    public enum Product {
        CATEGORY_1(1, "取件"),
        CATEGORY_2(2, "服务"),
        CATEGORY_3(3, "商品"),

        ON_OFF_STATUS_0(0, "未上架"),
        ON_OFF_STATUS_1(1, "上架");

        private Integer value;
        private String descr;

        Product(Integer value, String descr) {
            this.value = value;
            this.descr = descr;
        }

        public Integer getValue() {
            return value;
        }

        public String getDescr() {
            return descr;
        }
    }

    public static class DelvLabel {
        /**
         * 取快递
         */
        public static Integer LABEL_1 = 1;

    }

}
